package Book;

import Operation.Addoperation;

public class BookList{
    public int Quantity;

    public Book[] BookList=new Book[10];
    public BookList() {
        BookList[0] = new Book("三国演义", "罗贯中", "小说", 88);
        BookList[1] = new Book("红楼梦", "林黛玉", "小说", 78);
        BookList[2] = new Book("西游记", "吴承恩", "小说", 58);
        this.Quantity = 3;
    }

    public int getQuantity() {
        return Quantity;
    }

    public void setQuantity(int quantity) {
        Quantity = quantity;
    }
    public Book getpoi(int poi){
        return BookList[poi];
    }
    public void Add(Book book,int Quantity){
        BookList[Quantity]=book;
    }
    public void Del(int inde,int Quantity){
        for (int i = inde; i < Quantity-1; i++) {
            BookList[i]=BookList[i+1];
        }
        BookList[Quantity]=null;
    }
}
